/* 文科生学编程 - 自定义样式 */

/* 动画效果 */
@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
    100% { transform: translateY(0px); }
}

@keyframes pulse-glow {
    0% { box-shadow: 0 0 5px rgba(147, 51, 234, 0.5); }
    50% { box-shadow: 0 0 20px rgba(147, 51, 234, 0.8); }
    100% { box-shadow: 0 0 5px rgba(147, 51, 234, 0.5); }
}

/* 浮动动画 */
.floating {
    animation: float 3s ease-in-out infinite;
}

/* 积木块样式 */
.code-block {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: grab;
    transition: all 0.3s ease;
    user-select: none;
}

.code-block:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.code-block:active {
    cursor: grabbing;
}

/* 拖拽区域 */
.drop-zone {
    min-height: 100px;
    border: 2px dashed #cbd5e0;
    border-radius: 8px;
    padding: 20px;
    transition: all 0.3s ease;
}

.drop-zone.drag-over {
    border-color: #667eea;
    background-color: rgba(102, 126, 234, 0.1);
}

/* 成就徽章 */
.achievement-badge {
    display: inline-block;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: bold;
    animation: pulse-glow 2s ease-in-out infinite;
}

/* 代码高亮 */
.code-highlight {
    background: #2d3748;
    color: #e2e8f0;
    padding: 15px;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    overflow-x: auto;
}

.keyword { color: #fbb6ce; }
.string { color: #9ae6b4; }
.number { color: #90cdf4; }
.comment { color: #a0aec0; font-style: italic; }

/* 响应式设计 */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .grid-cols-3 {
        grid-template-columns: 1fr;
    }
    
    .grid-cols-2 {
        grid-template-columns: 1fr;
    }
}

/* 进度条样式 */
.progress-bar {
    width: 100%;
    height: 8px;
    background-color: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    transition: width 0.3s ease;
}

/* 卡片悬停效果 */
.card-hover {
    transition: all 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

/* 打字机效果 */
.typewriter {
    overflow: hidden;
    border-right: 0.15em solid #667eea;
    white-space: nowrap;
    margin: 0 auto;
    letter-spacing: 0.15em;
    animation: typing 3.5s steps(40, end), blink-caret 0.75s step-end infinite;
}

@keyframes typing {
    from { width: 0 }
    to { width: 100% }
}

@keyframes blink-caret {
    from, to { border-color: transparent }
    50% { border-color: #667eea; }
}
